package com.bdqn.Di3Zhan;

import com.bdqn.Di3Zhan.entity.News;
import com.bdqn.Di3Zhan.entity.NewsDao;
import com.bdqn.Di3Zhan.entity.NewsServiceImpl;
import org.junit.Test;

public class NewServiceImpl {

    @Test
    public void addNews() throws Exception{
        NewsDao dao = SimpleDaoFactory.getInstance();

        NewsServiceImpl service = new NewsServiceImpl();
        service.setDao(dao);

        News news = new News();
        news.setNtitle("测试标题2");
        news.setNcontent("测试内容2");

        service.addNews(news);
    }
}
